package com.lhy.skywalking.order.controller;

import com.lhy.skywalking.order.dto.OrderDTO;
import com.lhy.skywalking.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/orders")
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/{id}")
    public OrderDTO detailById(@PathVariable long id) {
        return orderService.datailById(id);
    }
}
